package server.Mapper;

import server.HttpServlet;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * @Author: Hugh
 * @Date: 2020/6/1
 */
public class ContextMapper {

    /**
     * key : project
     * val : HttpServletWrapper
     */
    private Map<String, WrapperMapper> contextMapper;

    public Map<String, WrapperMapper> getContextMapper() {
        return contextMapper;
    }

    public void setContextMapper(String key, WrapperMapper wrapperMapper) {
        if(Objects.isNull(contextMapper)){
            contextMapper = new HashMap<>();
        }
        contextMapper.put(key, wrapperMapper);
    }
}
